<?php

class Inc_Form_Login extends Zend_Form
{
	public function init()
	{
		$this->setAction('/admin/login')->setMethod('post');
		
		/*
		 * 		USERNAME
		 */
		$this->addElement('text', 'username', array(
				'label' => 'User Name:',
				'size' => 35,
				'required' => true,
				'validator' => 'Alnum',
				'filters' => array('HtmlEntities', 'StringTrim')
				));
		
		/*
		 * 		PASSWORD
		 */
		$this->addElement('password', 'password', array(
				'label' => 'User Password:',
				'size' => 35,
				'required' => 'true',
				'filters' => array('HtmlEntities', 'StringTrim')
				));
		
		/*
		 * 		SUBMIT
		 */
		
		
		$this->addElement('submit', 'submit', array(
				'label' => 'login'
				));
		
		/*
		 * 		LOGIN GROUP
		 */
		
		$this->addDisplayGroup(
				array('username', 'password', 'submit'), 'loginGroup');		
		
		$this->getDisplayGroup('loginGroup')
		->setLegend('LOGIN');
	}
}